filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')
# compare with p-WT (baseline)
PV_values$genotype <- factor(PV_values$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug != 'altered contexts')
# compare with p-WT (baseline)
PV_values$genotype <- factor(PV_values$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "etomidate 2mg/kg", "etomidate 4mg/kg", "etomidate 6mg/kg", "etomidate 7mg/kg", "etomidate 8mg/kg"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'p-WT')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'a5-i-KO')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'a5-pyr-KO')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'p-WT')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'a5-i-KO')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for PV correlations
# load data
PV_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/PV_correlation.xlsx")
# filter out data based on mobility of the animal
PV_values <- PV_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'a5-pyr-KO')
# make sure you compare with saline baseline
PV_values$drug <- factor(PV_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=FALSE)
anova(
PV_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
PV_values.model= lmer (PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=PV_values, REML=TRUE)
plot(residuals(PV_values.model),las=1, ylim=c(-2,2))
hist(residuals(PV_values.model),las=1)
qqnorm(residuals(PV_values.model),las=1)
qqline(residuals(PV_values.model), col = "red", lwd=2)
summary(PV_values.model)
sjPlot::plot_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(PV_values.model, title = "PV_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on animal's mobility
RMvalues <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug != 'altered contexts')
# compare with p-WT (baseline)
RMvalues$genotype <- factor(RMvalues$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# make sure you compare with saline baseline
RMvalues$drug <- factor(RMvalues$drug, levels = c("saline", "etomidate 2mg/kg", "etomidate 4mg/kg", "etomidate 6mg/kg", "etomidate 7mg/kg", "etomidate 8mg/kg"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date) + (1|cell_ID:animal_ID), data=RMvalues, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date) + (1|cell_ID:animal_ID), data=RMvalues, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date) + (1|cell:animal_ID)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date) + (1|cell:animal_ID)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'a5-i-KO')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'a5-i-KO')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'p-WT')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')
# compare with p-WT (baseline)
RM_values$genotype <- factor(RM_values$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'p-WT')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg')
# compare with p-WT (baseline)
RM_values$genotype <- factor(RM_values$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug * genotype + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline')
# compare with p-WT (baseline)
RM_values$genotype <- factor(RM_values$genotype, levels = c("p-WT", "a5-i-KO", 'a5-pyr-KO'))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ genotype + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ genotype + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ genotype + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'a5-i-KO')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'altered contexts')%>%
filter(genotype == 'a5-pyr-KO')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "altered contexts"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
# linear mixed model statistics for RM correlations
# load data
RM_correlation <- read_excel("D:/Meta_AnaOutput_Graphs/Zhu 2022 GAD paper (combined p-WTs)/RM_correlation.xlsx")
# filter out data based on mobility of the animal
RM_values <- RM_correlation %>%
filter(session1_mobility_pass == 1 & session2_mobility_pass == 1) %>%
filter(drug == 'saline' | drug == 'etomidate 7mg/kg') %>%
filter(genotype == 'a5-pyr-KO')
# make sure you compare with saline baseline
RM_values$drug <- factor(RM_values$drug, levels = c("saline", "etomidate 7mg/kg"))
# test using LMEM & ANOVA
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=FALSE)
anova(
RM_values.model,
type = c("III", "II", "I", "3", "2", "1"),
ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))
# perform some plotting
par(mfrow=c(1,3))
RM_values.model= lmer (RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date), data=RM_values, REML=TRUE)
plot(residuals(RM_values.model),las=1, ylim=c(-2,2))
hist(residuals(RM_values.model),las=1)
qqnorm(residuals(RM_values.model),las=1)
qqline(residuals(RM_values.model), col = "red", lwd=2)
summary(RM_values.model)
sjPlot::plot_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)")
sjPlot:: tab_model(RM_values.model, title = "RM_values ~ drug + (1|animal_ID) + (1|animal_ID:expt_date)",
auto.label = TRUE, show.stat = TRUE, show.df = TRUE, show.se = TRUE)
